package com.tbit.uqbike.client.service.impl;

import com.tbit.uqbike.center.pojo.MachineStatus;
import com.tbit.uqbike.center.provide.MachineStatusProvideService;
import com.tbit.uqbike.client.service.MachineStatusConsumerService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 设备状态消费者
 *
 * @author Leon
 * 2017年2月24日 下午4:09:17
 */
@Component
public class MachineStatusConsumerServiceImpl implements MachineStatusConsumerService {

    @DubboReference
    private MachineStatusProvideService machineStatusProvideService;

    /**
     * 根据设备id获取设备最后状态
     *
     * @param machineIds
     * @return
     */
    public List<MachineStatus> getByMachineIds(List<Integer> machineIds) {
        return machineStatusProvideService.getByMachineIds(machineIds);
//        return null;
    }

}  